<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Subject')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-subject" class="form-control selectpicker" name="row[subject]">
                {foreach name="subjectList" item="vo"}
                <option value="{$key}" {in name="key" value="$row.subject" }selected{/in}>{$vo}</option>
                {/foreach}
            </select>
        </div>
    </div>
    <!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
        <div class="col-xs-12 col-sm-8">
                        
            <select  id="c-type" class="form-control selectpicker" name="row[type]">
                {foreach name="typeList" item="vo"}
                    <option value="{$key}" {in name="key" value="$row.type"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div> -->

    <div class="form-group" data-favisible="type=1">
        <label class="control-label col-xs-12 col-sm-2">{:__('Category_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-category_id" min="0" data-rule="required" data-source="course/category/index"
                data-field='title' class="form-control selectpage" name="row[category_id]" type="text"
                value="{$row.category_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" class="form-control" name="row[title]" type="text" value="{$row.title|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Description')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-description" class="form-control" name="row[description]" type="text"
                value="{$row.description|htmlentities}">
        </div>
    </div>
    <div class="form-group" data-favisible="type=2">
        <input id="c-type" class="form-control" name="row[type]" type="hidden" value="{$row.type|htmlentities}">
        <label class="control-label col-xs-12 col-sm-2">{:__('限制人数')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-total_num" class="form-control" name="row[total_num]" type="text"
                value="{$row.total_num|htmlentities}">
        </div>
    </div>
    <div class="form-group" data-favisible="type=2">
        <label class="control-label col-xs-12 col-sm-2">{:__('报名结束时间')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-endtime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[endtime]" type="text" value="{$row.endtime?datetime($row.endtime):''}">

        </div>
    </div>
    <div class="form-group" data-favisible="type=2">
        <label class="control-label col-xs-12 col-sm-2">{:__('培训时间')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-trainingtime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[trainingtime]" type="text" value="{$row.trainingtime?datetime($row.trainingtime):''}">

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" class="form-control editor" rows="5" name="row[content]"
                cols="50">{$row.content|htmlentities}</textarea>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-image" class="form-control" size="50" name="row[image]" type="text"
                    value="{$row.image|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-image" class="btn btn-danger faupload"
                            data-input-id="c-image"
                            data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp"
                            data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i>
                            {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose"
                            data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i
                                class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-image"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-image"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('附件类型')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-class" class="form-control selectpicker" name="row[class]">
                <option value="1" {in name="1" value="$row.class" }selected{/in}>图片</option>
                <option value="2" {in name="2" value="$row.class" }selected{/in}>视频</option>
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('File')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-file" class="form-control" size="50" name="row[file]" type="text"
                    value="{$row.file|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-file" class="btn btn-danger faupload"
                            data-input-id="c-file" data-multiple="false" data-preview-id="p-file"><i
                                class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-file" class="btn btn-primary fachoose"
                            data-input-id="c-file" data-multiple="false"><i class="fa fa-list"></i>
                            {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-file"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-file"></ul>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>